package cn.imvc.app.models;

import java.util.List;
import java.util.Map;

import cn.imvc.app.entities.Address;
import cn.imvc.app.entities.Member;

public interface AddressModel {

	Address get(int id);

	Address save(Address entity);

	Address update(Address entity);

	Map<String, String> delete(Member member, int id);

	void deleteBatch(int[] ids);
	
	/**
	 * 查询会员所有收货地址
	 * @param memberid
	 * @return
	 */
	List<Address> findByMemberId(int memberid);

	/**
	 * 添加收货地址
	 * @param token
	 * @param name
	 * @param address
	 * @param area
	 * @param mobPhone
	 * @param isDefault
	 * @return
	 */
	Map<String, String> saveAddress(Member member, Address address, String area);
	
	/**
	 * 修改收货地址
	 * @param token
	 * @param address
	 * @param area
	 * @return
	 */
	Map<String, String> updateAddress(Member member, Address address, String area);
	
	/**
	 * 指定收货地址设置为默认
	 * @param token
	 * @param id
	 * @return
	 */
	Map<String, String> setDefault(Member member, int addressid);
}